package com.jic.market.enums;

/**
 * @author wwb
 * @date: 2020/3/13
 */
public enum CouponStatusEnum {

    //
    WAIT_SUBMIT(1, "待提交"),
    TO_AUDIT(2, "待审核"),
    NOT_START(3, "未开始"),
    AUDIT_NOT_PASS(4, "审核不通过"),
    ING(5, "进行中"),
    EXPIRED(6, "已过期"),
    CLOSED(7, "已关闭"),
    END(8, "已结束"),
    DRAFT(9, "审核通过"),


    TEMPLATE(10, "模板状态"),
    AUDIT_PASS(11, "审核通过"),


    ;

    private Integer code;
    private String message;

    CouponStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public CouponStatusEnum getByCode(Integer code){
        CouponStatusEnum[] values = CouponStatusEnum.values();
        for(CouponStatusEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
